import Vue from "vue";
import VueRouter from "vue-router";
import Login from "../views/Login";
import Add from "../views/Add";
import List from "../views/List";
import Col from "../clo/Main";
import Home from "../views/Home";
import Shopping from "../views/Shopping";
import Love from "../views/Love";
Vue.use(VueRouter);

const routes = [
    {
        path: "/",
        component: Login,
    },
    {
        path: "/main",
        component: Col,
        children: [
            {
                path: "/main/list",
                component: List,
            },
            {
                path: "/main/add",
                component: Add,
            },
            {
                path: "/main/shopping",
                component: Shopping,
            },

            {
                path: "/main/home",
                component: Home,
            },
            {
                path: "/main/love",
                component: Love,
            },
        ],
    },
];

const router = new VueRouter({
    mode: "history",
    base: process.env.BASE_URL,
    routes,
});

export default router;
